<?php include("src/accesUser_cs.php");
@session_start();
$_SESSION['varMenu'] = 'Users';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to control panel</title>
<link href="style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

</head>

<body class="style" onload="MM_preloadImages('images/menu3.png','images/menu2.png','images/noter (1).png','images/assignr.png','images/new_taskr.png','images/mailr.png','images/edit_2r.png','images/client_3r.png','images/deleter.png','images/backr.png')">

<div id="container">
  <?php include('header.php');?>
  <div id="mainContent">  
    <?php include('menuTop.php');?>
    <div id="bg">
	  <form name="form" id="form" method="post" action="" enctype="multipart/form-data">
	  <input type="hidden" name="save" id="save" value="1"/>
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        
        <tr>
          <td><H1>Access User</H1></td>
        </tr>
        <tr>
          <td align="center"><table width="80%" border="0" cellpadding="8" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
              <td colspan="2" align="center" valign="top" bgcolor="#400000">&nbsp;</td>
              </tr>
            <tr>
              <td width="75%" align="center" valign="top">
               
                <table width="40%" border="0" align="center" background="../images/table1.jpg">
					<tr>
						<td colspan="5"><span class="Estilo4"> <strong>User: </strong><?php echo $data[0]->name;?></span> </td>
					</tr>
					<tr>
						<td colspan="2">&nbsp;</td>
						<td colspan="3" align="center"><strong>Actions</strong></td>
					</tr>  	
					<tr>
						<td  colspan="2"><strong>Modules</strong></td>  
						<td align="center"><strong>Write</strong></td>
						<td align="center"><strong>Read</strong></td>
						<td align="center"><strong>None</strong></td>
					</tr>
					<tr>
						<td colspan="5">&nbsp;</td>
					</tr>
					<?php 
					for($i=0;$i<count($data);$i++)
					{
					?>
					<tr>
						<td colspan="2"><?php echo $data[$i]->mod_name;?></td>
						<td align="center">
						<input type="radio" name="<?php echo $data[$i]->mod_code;?>" 
						value="Write"<?php if($data[$i]->uspr_property=='Write') echo 'checked="checked"';?>/>
						</td>
						<td align="center">
						<input type="radio" name="<?php echo $data[$i]->mod_code;?>" 
						value="Read"<?php if($data[$i]->uspr_property=='Read') echo 'checked="checked"';?> />
						</td>
						<td align="center">
						<input type="radio" name="<?php echo $data[$i]->mod_code;?>" 
						value="None"<?php if($data[$i]->uspr_property=='None') echo 'checked="checked"';?>/>
						</td>
					</tr>
					<?php 
					}
					?>
					<tr>
						<td colspan="5">&nbsp;</td>
					</tr>
					<tr>					
						<td colspan="5" align="center"> 
						<input type="submit" value="Save"/>
						<input type="button" value="Go Back" onclick="javascript: window.history.back()"/>		</td>
					</tr>
				</table>
                </td>
              
            </tr>
            <tr>
              <td colspan="2" align="center" valign="top" bgcolor="#400000"><br /></td>
              </tr>
          </table>
          <br /></td>
        </tr>
      </table>
	  </form>
    </div>
    <br />
    <br />
    <!-- end #mainContent -->
  </div>
  <?php include('footer.php');?>
<!-- end #container --></div>

</body>
</html>
